﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NGUYENTHANHDONG.OOP.Inhertance___Polimophism.TEST.EXCERCISE_01
{
    class HinhBatGiac: GeometricObject
    {
        double side;

        public HinhBatGiac()
        { }

        public HinhBatGiac(double side)
        {
            this.side = side;
        }

        public override double GetPerimeter()
        {
            return (8 * side);
        }

        public override double GetArea()
        {
            return (2 + 4 / Math.Sqrt(2)) * side * side;
        }
    }
}
